﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Themes/MasterPage.master" AutoEventWireup="true"
    CodeFile="PlanDetail.aspx.cs" Inherits="PlanMangement_PlanDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style>
        .modalPopup
        {
            background-color: #FAD817;
            border-width: 3px;
            border-style: solid;
            border-color: Gray;
            padding: 3px;
            width: 250px;
        }
        .modalBackground
        {
            filter: alpha(opacity=70);
            opacity: 0.7;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TabTitle" runat="Server">
    <%=Resources.Resource.PlanDetails%><%--计划明细--%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">
    <div class="GridDivCss">
        <IMC:GridView ID="gvPlanDetail" runat="server" AllowPaging="true" AllowSorting="true"
            PageSize="12">
            <Columns>
                <asp:TemplateField HeaderText="<%$Resources:Resource,ProductID%>" ItemStyle-HorizontalAlign="Center">  <%--产品编号--%>
                    <ItemTemplate>
                        &nbsp;<asp:Label ID="lbl_xSVMaterial" runat="server" Text='<%#Eval("xSVMaterial")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$Resources:Resource,PlanYear%>" ItemStyle-HorizontalAlign="Center">   <%--计划年--%>
                    <ItemTemplate>
                        &nbsp;
                        <asp:Label ID="lbl_PlanYear" runat="server" Text='<%#Eval("PlanYear")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$Resources:Resource,PlanMonths%>" ItemStyle-HorizontalAlign="Center">      <%--计划月--%>
                    <ItemTemplate>
                        &nbsp;
                        <asp:Label ID="lbl_PlanMonth" runat="server" Text='<%#Eval("PlanMonth")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$Resources:Resource,NumberDfPlans%>" ItemStyle-HorizontalAlign="Center">    <%--计划数量--%>
                    <ItemTemplate>
                        &nbsp;
                        <asp:Label ID="lbl_PlanMount" runat="server" Text='<%#Eval("PlanMount")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$Resources:Resource,ActualCapacity%>" ItemStyle-HorizontalAlign="Center" Visible="false">     <%--实际能力--%>
                    <ItemTemplate>
                        &nbsp;
                        <asp:Label ID="lbl_ActualCapacity" runat="server" Text='<%#Eval("PlanMount")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="ForcastTEEP" ItemStyle-HorizontalAlign="Center" Visible="false">
                    <ItemTemplate>
                        &nbsp;
                        <asp:Label ID="lbl_ForcastTEEP" runat="server" Text='<%#Eval("PlanMount")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$Resources:Resource,Maintain%>" ItemStyle-HorizontalAlign="Center">   <%--维护--%>
                    <ItemTemplate>
                        &nbsp; <a href="javascript:Upd('<%#Eval("xSVMaterial")%>','<%#Eval("PlanYear")%>','<%#Eval("PlanMonth")%>','<%#Eval("PlanMount")%>','<%#Eval("PlanMount")%>','<%#Eval("PlanMount")%>')">
                            <%=Resources.Resource.btnMaintain %> </a>     <%--维护--%>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </IMC:GridView>
    </div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <input id="btnPreview" runat="server" type="button" value="预览" cssclass="buttonbgtwo"
        style="display: none;" />
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender" runat="server" TargetControlID="btnPreview"
        PopupControlID="Panel1" BackgroundCssClass="modalBackground" CancelControlID="btnCancel"
        DropShadow="true" PopupDragHandleControlID="Panel3" />
    <asp:Panel ID="Panel1" runat="server" Width="580px" Style="display: none" CssClass="modalPopup">
        <asp:Panel ID="Panel3" runat="server" Style="cursor: move; background-color: #DDDDDD;
            border: solid 1px Gray; color: Black">
            <div class="tagdivhead" style="background-color: #D6E0EE; padding-top: 8px">
                <div class="divcenter">
                    <span>&nbsp;<asp:Label ID="lbtitle" runat="server" CssClass="querytextCss" Width="150px"
                        Height="16px" Text="<%$Resources:Resource,PlanDetailsMaintenance%>"></asp:Label> <%--计划明细维护--%>
                    </span>
                </div>
            </div>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ModifytableCss">
                <tr>
                    <td colspan="6" style="height: 1px">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="querytexttdCss">
                        <%=Resources.Resource.ProductID%><%--产品编号--%>
                    </td>
                    <td class="querycoltdCss">
                        <asp:TextBox ID="txtProductNo" runat="server" Width="120px"></asp:TextBox>
                    </td>
                    <td class="querytexttdCss">
                       <%=Resources.Resource.PlanYear%> <%--计划年--%>
                    </td>
                    <td class="querycoltdCss">
                        <asp:TextBox ID="txtPlanYear" runat="server" Width="120px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="querytexttdCss">
                        <%=Resources.Resource.PlanMonths%><%--计划月--%>
                    </td>
                    <td class="querycoltdCss">
                        <asp:TextBox ID="txtPlanMonth" runat="server" Width="120px"></asp:TextBox>
                    </td>
                    <td class="querytexttdCss">
                        <%=Resources.Resource.NumberDfPlans%><%--计划数量--%>
                    </td>
                    <td class="querycoltdCss">
                        <asp:TextBox ID="txtPlanNum" runat="server" Width="120px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="6" style="height: 1px">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="6" style="padding-bottom: 3; padding-top: 3">
                        <asp:Button ID="btnUpd" runat="server" Text="<%$Resources:Resource,btnSave%>" />    <%--保 存--%>
                        &nbsp;&nbsp;
                        <asp:Button ID="btnCancel" runat="server" Text="<%$Resources:Resource,btnClear%>" />   <%--取 消--%>
                    </td>
                </tr>
                <tr>
                    <td colspan="6" style="height: 1px">
                        &nbsp;
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </asp:Panel>
    <script type="text/javascript">
        function Add() {

            document.getElementById("<%= txtProductNo.ClientID%>").value = "";
            document.getElementById("<%= txtPlanYear.ClientID%>").value = "";
            document.getElementById("<%= txtPlanMonth.ClientID%>").value = "";
            document.getElementById("<%= txtPlanNum.ClientID%>").value = "";


            document.getElementById('<%= btnPreview.ClientID%>').click();
            return false;
        }


        function Upd(ProductNo, ProjectYear, ProjectMonth, ProjectNum, ActualCapacity, ForcastTEEP) {

            document.getElementById("<%= txtProductNo.ClientID%>").value = ProductNo;
            document.getElementById("<%= txtPlanYear.ClientID%>").value = ProjectYear;
            document.getElementById("<%= txtPlanMonth.ClientID%>").value = ProjectMonth;
            document.getElementById("<%= txtPlanNum.ClientID%>").value = ProjectNum;

            document.getElementById('<%= btnPreview.ClientID%>').click();

        }
        function Closed() {
            window.opener = null; window.close();
        }
    </script>
</asp:Content>
